const { Schema, SchemaTypes } = require('../schema');
class SubCategory extends Schema {
    PropertyModelDataTemplate () {
        return {
            areaId: { type: SchemaTypes.ObjectId, required: true },
            mainCategoryId: { type: SchemaTypes.ObjectId, required: true },
            name: { type: SchemaTypes.String, required: true },
            createTime: { type: SchemaTypes.Number, required: true, default: require('../../module/tool/time').getCurrentTimestamp() },
            isEnable: { type: SchemaTypes.Boolean, required: true, default: false },
            sort: { type: SchemaTypes.Number, required: true, default: 0 }
        };
    }
}

module.exports = SubCategory;
